package com.kelvin.paopao.injector.modules;

import com.kelvin.paopao.adapter.GoodAdapter;
import com.kelvin.paopao.injector.PerActivity;
import com.kelvin.paopao.module.market.market.gooddetail.GoodDetailActivity;
import com.kelvin.paopao.module.market.market.gooddetail.GoodDetailPresenter;
import com.kelvin.paopao.module.market.market.gooddetail.IGoodDetailPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * Created by MCK on 2017/5/11.
 */

@Module
public class GoodDetailModule {
    private GoodDetailActivity mView;

    public GoodDetailModule(GoodDetailActivity view){
        this.mView=view;
    }

    @PerActivity
    @Provides
    public IGoodDetailPresenter providerPresenter(){
        return new GoodDetailPresenter(mView);
    }

    @PerActivity
    @Provides
    public GoodAdapter providerAdapter(){
        return new GoodAdapter(mView);
    }
}
